﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.WindowsAzure;
using Microsoft.WindowsAzure.StorageClient;

namespace Azure.TableQuery.Tests
{
    public abstract class BaseTest
    {
        protected CloudStorageAccount account;

        public BaseTest()
        {
            account = CloudStorageAccount.DevelopmentStorageAccount;
            var tableClient = new CloudTableClient(@"http://ipv4.fiddler:10002/devstoreaccount1",
                account.Credentials);
            //var tableClient = account.CreateCloudTableClient();
            tableClient.DeleteTableIfExist("TestEntity");
            tableClient.CreateTableIfNotExist("TestEntity");

            var testContext = new TestEntityContext(account.TableEndpoint.ToString(), account.Credentials);
            testContext.CreateTestEntities(5);

        }
    }
}
